home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / utildsk / memry374.lha / memory-device / source / copymem.asm < prev    next >
Assembly Source File  |  1996-03-29  |  2KB  |  68 lines

  1. ;*
  2. ;*  $VER: copy.asm 1.2 (29 Mar 1996)(23 Mar 1996)
  3. ;*
  4. ;* memory.device - direct memory access
  5. ;*
  6. ;* (C) Copyright 1996 Marius Gröger
  7. ;*     All Rights Reserved
  8. ;*
  9. ;* Inspired by z2ram device in Linux/68k/Amiga
  10. ;*
  11. ;* $HISTORY:
  12. ;*
  13. ;* 29 Mar 1996 : 001.002 :  improved even more
  14. ;* 23 Mar 1996 : 001.001 :  improved
  15. ;* 10 Mar 1996 : 001.000 :  created
  16. ;*
  17.       section "text",code
  18.  
  19. ;----------------------------------------------------------------------------
  20.  
  21.  
  22.       xdef    _CopyMemWarp
  23.  
  24.  
  25. ;----------------------------------------------------------------------------
  26. ;
  27. ; NAME
  28. ;     CopyMemWarp() - copy memory block assuming length = n * 128 Bytes
  29. ;
  30. ; SYNOPSIS
  31. ;     void CopyMemWarp(VOID *src, VOID *dst, ULONG len)
  32. ;                             A0         A1         D0
  33. ;
  34. ; FUNCTION
  35. ;     This is a very fast CopyMem() style function. It is assumed that length
  36. ;     of the data to be copied is a multiple of 64 Bytes. The maximum
  37. ;     length allowed is (2^22)-1 bytes.
  38. ;
  39. ; SEE ALSO
  40. ;     exec.library/CopyMem(), exec.library/CopyMemQuick()
  41.  
  42. _CopyMemWarp:
  43.       asr.l    #6,d0
  44.       bra      start
  45. copy:
  46.       move.l   (a0)+,(a1)+
  47.       move.l   (a0)+,(a1)+
  48.       move.l   (a0)+,(a1)+
  49.       move.l   (a0)+,(a1)+
  50.       move.l   (a0)+,(a1)+
  51.       move.l   (a0)+,(a1)+
  52.       move.l   (a0)+,(a1)+
  53.       move.l   (a0)+,(a1)+
  54.       move.l   (a0)+,(a1)+
  55.       move.l   (a0)+,(a1)+
  56.       move.l   (a0)+,(a1)+
  57.       move.l   (a0)+,(a1)+
  58.       move.l   (a0)+,(a1)+
  59.       move.l   (a0)+,(a1)+
  60.       move.l   (a0)+,(a1)+
  61.       move.l   (a0)+,(a1)+
  62. start:
  63.       dbra     d0,copy
  64.       rts
  65.  
  66.  
  67.          end
  68.